<?php 
header("Content-type: text/html; charset=utf-8"); 

include_once($_SERVER['DOCUMENT_ROOT']."/common/config.php");
$_conn = connect_mysql('wit_curriculum');

if(!preg_match('/^\d{10}$/', $_GET['studentId'])){
	echo 'failed';
}else{
	$studentId = $_GET['studentId'];
	$sql = "SELECT * FROM wit_md5 WHERE uid = '$studentId'";
	$res = mysqli_query($_conn, $sql) or die;//(mysqli_error($_conn));
	$row = mysqli_fetch_assoc($res);
	if($row){
		echo $row['md5'];
	}else{
		echo 'none';
	}
}